<template>
    <div>
        <a-space>
            <a-button v-if="$checkAuth('AddBtn')" type="primary">
                新增
            </a-button>
            <a-button v-if="$checkAuth('EditBtn')">编辑</a-button>
            <a-button v-if="$checkAuth('ViewBtn')" type="dashed">
                查阅
            </a-button>
            <a-button v-if="$checkAuth('DelBtn')" type="danger">
                删除
            </a-button>
        </a-space>

        <hr />

        <div>权限模拟登录账号测试：</div>
        <span>admin </span>123456
        <div>
            <span>sso </span>
            <span>111111</span>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            timer: null
        };
    },
    mounted() {
        this.$db.set("token", "29203|t8eCSSEMVbuAObsrc7KfgYaL3ohzLvrZiQ1Gk6DI");
        // 检查首屏加载时间
    //    const time = performance.getEntriesByName("first-contentful-paint")[0].startTime
    //    console.log(time,'time');

    },
};
</script>

<style lang="less" scoped>
.scroll-container {
    height: 500px;
    overflow-y: auto;
    border: 1px solid #bfa;
    position: relative;
    h2 {
        height: 30px;
        position: sticky;
        top: 0;
        z-index: 11;
        background-color: seagreen;
    }
}
</style>
